<div class="zs-body" data-ng-init="formInit('datadefinition', {
        keyField:'id',
        randomFields:['id'],
        orderObject:{order:0}
    }) && loadData('datadefinition');setConHei();">
    <div class="zs-map-tool">
        <div class="location">
            <a href="javascript:;">首页</a>
            <i class="right-arr"></i>
            <a href="javascript:;">地图配置</a>
            <i class="right-arr"></i>
            <a href="javascript:;">数据定义</a>
        </div>
        <div class="option">
            <input type="button" class="zs-btn orange" value="新建" ng-click="addRow('datadefinition') && openWindow('edit');" />
            <input type="button" class="zs-btn orange" value="编辑" ng-click="editRow('datadefinition', datadefinition.sRows[0]) && openWindow('edit')"
            />
            <input type="button" class="zs-btn orange" value="删除 " ng-click="delEntitys('datadefinition')" />
        </div>
    </div>
    <div class="zs-content" style="position:unset">
        <div class="zs-nice-tab idTabs">
            <div class="tool item" style="margin-left:6px;">
                <span class="search-warpper">
                    <i class="icon"></i>
                    <input type="text" class="zs-input" placeholder="数据名称" ng-model="datadefinition.queryObject['dataname']" />
                </span>
                <span class="search-warpper">
                    <i class="icon"></i>
					<ag-Combobox class="zs-input" style="height:28px;" placeholder="数据类型" 
						para="{uDictionary:true,dictionary:'g_pro_layer_type',addSpace:true,superNullItem:false}"
						ng-model="datadefinition.queryObject['datatype']" />
                </span>
            </div>
            <div class="operation item">
                <a class="ope-1" ng-click="loadData('datadefinition')"></a>
                <a class="ope-2"></a>
            </div>
            <div class="switch">

            </div>
        </div>
        <div class="date-container">
            <div id="zpgwd">
                <div class="zs-data-table">
                    <div class="container">
                        <table>
                            <thead>
                                <tr>
                                    <th>
                                        <input id="allCheckbox" type="checkbox" ng-click="selectAll('datadefinition','allCheckbox');" />
                                    </th>
									<th>序号</th>
                                    <th>数据名称</th>
                                    <th>数据类型</th>
                                    <th>数据表名</th>
                                    <th>数据服务名</th>
                                    <th>是否有效</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ng-repeat="r in datadefinition.datas">
                                    <td>
                                        <input type="checkbox" ng-click="selectRow('datadefinition',r);" ng-model="r.selected" />
                                    </td>
                                    <!--  排序值 -->
                                    <td>
                                    	<a ng-click="editRow('datadefinition',r) && openWindow('edit');">
                                    		<label ng-bind="r.order"></label>
                                    	</a>
                                    </td>
                                    <!--  数据名称 -->
                                    <td>
                                        <a ng-click="editRow('datadefinition',r) && openWindow('edit');">
                                            <label ng-bind="r.dataname"></label>
                                        </a>
                                    </td>
                                    <!--  数据类型 -->
                                    <td>
                                        <a ng-click="editRow('datadefinition',r) && openWindow('edit');">
                                            <label ng-bind="r.datatypename"></label>
                                        </a>
                                    </td>
                                    <!--  数据表名 -->
                                    <td>
                                        <a ng-click="editRow('datadefinition',r) && openWindow('edit');">
                                            <label ng-bind="r.datatable"></label>
                                        </a>
                                    </td>
                                    <!--  数据服务名 -->
                                    <td>
                                        <a ng-click="editRow('datadefinition',r) && openWindow('edit');">
                                            <label ng-bind="r.dataserver"></label>
                                        </a>
                                    </td>
                                    <!--  是否有效 -->
                                    <td>
                                        <a ng-click="editRow('datadefinition',r) && openWindow('edit');">
                                            <label ng-bind="r.valid | asChineseBool "></label>
                                        </a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="zs-pagination-box">
                    <ag-Page fn='datadefinition'></ag-Page>
                </div>
            </div>
        </div>

        <div ag-Window id="edit" title="数据定义编辑" width='560px' height='280px'>
            <div class="zs-form-tab ibox">
                <form name="form" novalidate>
                    <table width="100%">
                        <tbody>
                            <tr>
                                <td class="text" width="20%">数据名称</td>
                                <td class="left" width="30%">
                                    <input type="text" ng-model="datadefinition.editRow.dataname" class="zs-input" />
                                </td>
								<td class="text" width="20%">数据类型</td>
								<td class="left" width="30%">
									<ag-Combobox class="zs-input" style="width:153px;height:28px;" 
										para="{uDictionary:true,dictionary:'g_pro_layer_type'}" 
										ng-model="datadefinition.editRow.datatype"
										text-Value="datadefinition.editRow.datatypename" />
								</td>
                            </tr>
                            <tr>
                                <td class="text" width="20%">表空间名</td>
                                <td class="left" width="30%">
                                    <input type="text" ng-model="datadefinition.editRow.tableSpace" class="zs-input" />
                                </td>
                                <td class="text" width="20%">数据表名</td>
                                <td class="left" width="30%">
                                    <input type="text" ng-model="datadefinition.editRow.datatable" class="zs-input" />
                                </td>
                            </tr>
                            <tr>
                                <td class="text" width="20%">数据服务名</td>
                                <td colspan="3" class="left" width="80%">
                                    <input type="text" ng-model="datadefinition.editRow.dataserver" class="zs-input" />
                                </td>
                            </tr>
                            <tr>
                                <td class="text" width="20%">元数据</td>
                                <td colspan="3" class="left" width="80%">
                                    <input type="text" ng-model="datadefinition.editRow.metadata" class="zs-input" />
                                </td>
                            </tr>
                            <tr>
                                <td class="text" width="20%">空间参考</td>
                                <td class="left" width="30%">
                                    <input type="text" ng-model="datadefinition.editRow.spatialReference" class="zs-input" />
                                </td>
                                <td class="text" width="20%">主键名称</td>
                                <td class="left" width="30%">
                                    <input type="text" ng-model="datadefinition.editRow.objectIdFieldName" class="zs-input" />
                                </td>
                            </tr>
                            <tr>
                                <td class="text" width="20%">是否有效</td>
                                <td class="left" width="30%">
                                    <input type="checkbox" ng-model="datadefinition.editRow.valid" ng-true-value="true" ng-false-value="false" value='false'
                                    />
                                </td>
								<td class="text" width="20%">排序值</td>
								<td class="left" width="30%">
									<input type="text" ng-model="datadefinition.editRow.order" class="zs-input" />
								</td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="4">
                                    <input type="button" name="ok" value="保存" class="zs-btn c-red" ng-click="formValidate(form) && save('datadefinition', datadefinition.editRow, saveCloseWindow)"
                                    />
                                    <input type="button" name="ok" value="取消" class="zs-btn c-green" ng-click="closeWindow('edit')" />
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>
